package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CallcenterMapper;
import com.ruoyi.system.domain.Callcenter;
import com.ruoyi.system.service.ICallcenterService;
import com.ruoyi.common.support.Convert;

/**
 * 客服电话 服务层实现
 * 
 * @author ruoyi
 * @date 2019-07-16
 */
@Service
public class CallcenterServiceImpl implements ICallcenterService 
{
	@Autowired
	private CallcenterMapper callcenterMapper;

	/**
     * 查询客服电话信息
     * 
     * @param callcenterId 客服电话ID
     * @return 客服电话信息
     */
    @Override
	public Callcenter selectCallcenterById(Integer callcenterId)
	{
	    return callcenterMapper.selectCallcenterById(callcenterId);
	}
	
	/**
     * 查询客服电话列表
     * 
     * @param callcenter 客服电话信息
     * @return 客服电话集合
     */
	@Override
	public List<Callcenter> selectCallcenterList(Callcenter callcenter)
	{
	    return callcenterMapper.selectCallcenterList(callcenter);
	}
	
    /**
     * 新增客服电话
     * 
     * @param callcenter 客服电话信息
     * @return 结果
     */
	@Override
	public int insertCallcenter(Callcenter callcenter)
	{
	    return callcenterMapper.insertCallcenter(callcenter);
	}
	
	/**
     * 修改客服电话
     * 
     * @param callcenter 客服电话信息
     * @return 结果
     */
	@Override
	public int updateCallcenter(Callcenter callcenter)
	{
	    return callcenterMapper.updateCallcenter(callcenter);
	}

	/**
     * 删除客服电话对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteCallcenterByIds(String ids)
	{
		return callcenterMapper.deleteCallcenterByIds(Convert.toStrArray(ids));
	}
	
}
